package svc

import (
	"shuqi-novel/api/internal/config"
	"shuqi-novel/novelrpc/novelrpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config   config.Config
	NovelRpc novelrpcclient.Novelrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		NovelRpc: novelrpcclient.NewNovelrpc(zrpc.MustNewClient(c.NovelRpc)),
	}
}
